/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.aal.entitybean;

import java.io.Serializable;
import java.security.Timestamp;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedNativeQueries;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import org.eclipse.persistence.annotations.Direction;
import org.eclipse.persistence.annotations.NamedStoredProcedureQuery;
import org.eclipse.persistence.annotations.StoredProcedureParameter;

/**
 *
 * @author thaoct1990_2pro
 */
@Entity


@NamedStoredProcedureQuery(name = "sp_findBookByName",
                           procedureName = "findBookByName1",
                           returnsResultSet = true,
                           resultClass=Products.class,
                           parameters={
                           @StoredProcedureParameter(queryParameter="name",name="name",direction=Direction.IN,type=String.class),
                           @StoredProcedureParameter(queryParameter="pageSize",name="pageSize",direction=Direction.IN,type=Integer.class),
                           @StoredProcedureParameter(queryParameter="currentPage",name="currentPage",direction=Direction.IN,type=Integer.class),
                           @StoredProcedureParameter(queryParameter="itemCount",name="itemCount",direction=Direction.OUT,type=Integer.class)
})

public class MyNamedQuery1 implements Serializable {

    @Id
    private Long id;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
}
